﻿using System;
using System.Collections.Generic;

namespace Mono.Cecil.Cil
{
	// Token: 0x02000132 RID: 306
	internal static class PdbGuidMapping
	{
		// Token: 0x06000B96 RID: 2966 RVA: 0x0003479C File Offset: 0x0003299C
		static PdbGuidMapping()
		{
			PdbGuidMapping.AddMapping(DocumentLanguage.C, new Guid("63a08714-fc37-11d2-904c-00c04fa302a1"));
			PdbGuidMapping.AddMapping(DocumentLanguage.Cpp, new Guid("3a12d0b7-c26c-11d0-b442-00a0244a1dd2"));
			PdbGuidMapping.AddMapping(DocumentLanguage.CSharp, new Guid("3f5162f8-07c6-11d3-9053-00c04fa302a1"));
			PdbGuidMapping.AddMapping(DocumentLanguage.Basic, new Guid("3a12d0b8-c26c-11d0-b442-00a0244a1dd2"));
			PdbGuidMapping.AddMapping(DocumentLanguage.Java, new Guid("3a12d0b4-c26c-11d0-b442-00a0244a1dd2"));
			PdbGuidMapping.AddMapping(DocumentLanguage.Cobol, new Guid("af046cd1-d0e1-11d2-977c-00a0c9b4d50c"));
			PdbGuidMapping.AddMapping(DocumentLanguage.Pascal, new Guid("af046cd2-d0e1-11d2-977c-00a0c9b4d50c"));
			PdbGuidMapping.AddMapping(DocumentLanguage.Cil, new Guid("af046cd3-d0e1-11d2-977c-00a0c9b4d50c"));
			PdbGuidMapping.AddMapping(DocumentLanguage.JScript, new Guid("3a12d0b6-c26c-11d0-b442-00a0244a1dd2"));
			PdbGuidMapping.AddMapping(DocumentLanguage.Smc, new Guid("0d9b9f7b-6611-11d3-bd2a-0000f80849bd"));
			PdbGuidMapping.AddMapping(DocumentLanguage.MCpp, new Guid("4b35fde8-07c6-11d3-9053-00c04fa302a1"));
			PdbGuidMapping.AddMapping(DocumentLanguage.FSharp, new Guid("ab4f38c9-b6e6-43ba-be3b-58080b2ccce3"));
		}

		// Token: 0x06000B97 RID: 2967 RVA: 0x00006203 File Offset: 0x00004403
		private static void AddMapping(DocumentLanguage language, Guid guid)
		{
			PdbGuidMapping.guid_language.Add(guid, language);
			PdbGuidMapping.language_guid.Add(language, guid);
		}

		// Token: 0x06000B98 RID: 2968 RVA: 0x000348DC File Offset: 0x00032ADC
		public static DocumentType ToType(this Guid guid)
		{
			bool flag = guid == PdbGuidMapping.type_text;
			DocumentType result;
			if (flag)
			{
				result = DocumentType.Text;
			}
			else
			{
				result = DocumentType.Other;
			}
			return result;
		}

		// Token: 0x06000B99 RID: 2969 RVA: 0x00034904 File Offset: 0x00032B04
		public static Guid ToGuid(this DocumentType type)
		{
			bool flag = type == DocumentType.Text;
			Guid result;
			if (flag)
			{
				result = PdbGuidMapping.type_text;
			}
			else
			{
				result = default(Guid);
			}
			return result;
		}

		// Token: 0x06000B9A RID: 2970 RVA: 0x00034930 File Offset: 0x00032B30
		public static DocumentHashAlgorithm ToHashAlgorithm(this Guid guid)
		{
			bool flag = guid == PdbGuidMapping.hash_md5;
			DocumentHashAlgorithm result;
			if (flag)
			{
				result = DocumentHashAlgorithm.MD5;
			}
			else
			{
				bool flag2 = guid == PdbGuidMapping.hash_sha1;
				if (flag2)
				{
					result = DocumentHashAlgorithm.SHA1;
				}
				else
				{
					bool flag3 = guid == PdbGuidMapping.hash_sha256;
					if (flag3)
					{
						result = DocumentHashAlgorithm.SHA256;
					}
					else
					{
						result = DocumentHashAlgorithm.None;
					}
				}
			}
			return result;
		}

		// Token: 0x06000B9B RID: 2971 RVA: 0x0003497C File Offset: 0x00032B7C
		public static Guid ToGuid(this DocumentHashAlgorithm hash_algo)
		{
			bool flag = hash_algo == DocumentHashAlgorithm.MD5;
			Guid result;
			if (flag)
			{
				result = PdbGuidMapping.hash_md5;
			}
			else
			{
				bool flag2 = hash_algo == DocumentHashAlgorithm.SHA1;
				if (flag2)
				{
					result = PdbGuidMapping.hash_sha1;
				}
				else
				{
					bool flag3 = hash_algo == DocumentHashAlgorithm.SHA256;
					if (flag3)
					{
						result = PdbGuidMapping.hash_sha256;
					}
					else
					{
						result = default(Guid);
					}
				}
			}
			return result;
		}

		// Token: 0x06000B9C RID: 2972 RVA: 0x000349C8 File Offset: 0x00032BC8
		public static DocumentLanguage ToLanguage(this Guid guid)
		{
			DocumentLanguage documentLanguage;
			bool flag = !PdbGuidMapping.guid_language.TryGetValue(guid, out documentLanguage);
			DocumentLanguage result;
			if (flag)
			{
				result = DocumentLanguage.Other;
			}
			else
			{
				result = documentLanguage;
			}
			return result;
		}

		// Token: 0x06000B9D RID: 2973 RVA: 0x000349F4 File Offset: 0x00032BF4
		public static Guid ToGuid(this DocumentLanguage language)
		{
			Guid guid;
			bool flag = !PdbGuidMapping.language_guid.TryGetValue(language, out guid);
			Guid result;
			if (flag)
			{
				result = default(Guid);
			}
			else
			{
				result = guid;
			}
			return result;
		}

		// Token: 0x06000B9E RID: 2974 RVA: 0x00034A28 File Offset: 0x00032C28
		public static DocumentLanguageVendor ToVendor(this Guid guid)
		{
			bool flag = guid == PdbGuidMapping.vendor_ms;
			DocumentLanguageVendor result;
			if (flag)
			{
				result = DocumentLanguageVendor.Microsoft;
			}
			else
			{
				result = DocumentLanguageVendor.Other;
			}
			return result;
		}

		// Token: 0x06000B9F RID: 2975 RVA: 0x00034A50 File Offset: 0x00032C50
		public static Guid ToGuid(this DocumentLanguageVendor vendor)
		{
			bool flag = vendor == DocumentLanguageVendor.Microsoft;
			Guid result;
			if (flag)
			{
				result = PdbGuidMapping.vendor_ms;
			}
			else
			{
				result = default(Guid);
			}
			return result;
		}

		// Token: 0x0400071D RID: 1821
		private static readonly Dictionary<Guid, DocumentLanguage> guid_language = new Dictionary<Guid, DocumentLanguage>();

		// Token: 0x0400071E RID: 1822
		private static readonly Dictionary<DocumentLanguage, Guid> language_guid = new Dictionary<DocumentLanguage, Guid>();

		// Token: 0x0400071F RID: 1823
		private static readonly Guid type_text = new Guid("5a869d0b-6611-11d3-bd2a-0000f80849bd");

		// Token: 0x04000720 RID: 1824
		private static readonly Guid hash_md5 = new Guid("406ea660-64cf-4c82-b6f0-42d48172a799");

		// Token: 0x04000721 RID: 1825
		private static readonly Guid hash_sha1 = new Guid("ff1816ec-aa5e-4d10-87f7-6f4963833460");

		// Token: 0x04000722 RID: 1826
		private static readonly Guid hash_sha256 = new Guid("8829d00f-11b8-4213-878b-770e8597ac16");

		// Token: 0x04000723 RID: 1827
		private static readonly Guid vendor_ms = new Guid("994b45c4-e6e9-11d2-903f-00c04fa302a1");
	}
}
